//
//  FBDUserListViewController.m
//  baodongPro
//
//  Created by feng on 16/8/17.
//  Copyright © 2016年 proper. All rights reserved.
//

#import "FBDUserListViewController.h"
#import "FBDAddFriendsViewController.h"
#import "FBDChatListViewController.h"
#import "NavBarTools.h"
@interface FBDUserListViewController ()<EMUserListViewControllerDelegate>

@end

@implementation FBDUserListViewController
{
    NavBarTools * _tool;
}

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [APPDelegate_FBD configeNavgationBar];
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    if (!_tool)
    {
        _tool=[NavBarTools defaultTools];
    }
    [_tool settingNavBarColorWithCurrentController:self];
    [_tool settingNavBarTitle:@"好友列表MM" rightItems:@[@"按钮a",@"按钮b"] currentVC:self rightItemBarAction:^(UIBarButtonItem *rightBarbutton) {
        
        
        FBDAddFriendsViewController* addFriendsVC=[[FBDAddFriendsViewController alloc] init];
        addFriendsVC.hidesBottomBarWhenPushed=YES;
        [self.navigationController pushViewController:addFriendsVC animated:YES];
        
        

        
    }];

    self.delegate=self;
    
    
    
}

#pragma private
- (void)userListViewController:(EaseUsersListViewController *)userListViewController
            didSelectUserModel:(id<IUserModel>)userModel
{

    FBDChatListViewController *viewController = [[FBDChatListViewController alloc] initWithConversationChatter:userModel.buddy conversationType:EMConversationTypeChat];
    viewController.title = userModel.buddy;
    viewController.hidesBottomBarWhenPushed=YES;
    [self.navigationController pushViewController:viewController animated:YES];


}

#pragma mark - public



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
